<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>创建用户</title>
</head>
<body>
<h1>创建用户</h1>
<form action="/saveUser" method="post">
    <p>姓名：<input type="text" name="name" th:value="${user?.name}"></p>
    <p>年龄：<input type="text" name="age" th:value="${user?.age}"></p>
    <p>手机号：<input type="text" name="phone" th:value="${user?.phone}"></p>
    <p>部门：
        <select name="deptCode" id="">
            <option th:each="d:${deptList}"
                    th:value="${d.deptCode}"
                    th:text="${d.deptName}">财务部</option>
        </select>
    </p>
    <p><button type="submit">提交</button></p>
</form>
<p th:text="${msg}"></p>
</body>
</html>